Skip to content

[PB-6503] Update private sharings - #2116

Open
TamaraFinogina wants to merge 28 commits into
masterfrom
update_private_sharings
Open

[PB-6503] Update private sharings#2116
TamaraFinogina wants to merge 28 commits into
masterfrom
update_private_sharings

Conversation

@TamaraFinogina

@TamaraFinogina TamaraFinogina commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description

Adds a new version of private file and folder sharing - based on a bucket key instead of a mnemonic. This implies changes in pretty much everything download-related.

P.S. It also adds multipart download for shared folders. Since multipart had to be changed anyway, we'll save 1 QA

Related Issues

Fixes BR-2165
Relates to PB-6503

Related Pull Requests

Merged server changes for sharing with non-users

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

  1. Download of own files/folders (small ones and big ones)
  2. Streaming of own videos
  3. Download of already shared files/folders (small ones and big ones)
  4. Streaming of already shared videos
  5. Sharing a file/folder with an existing user (a small one and a big one); the user should be able to see the file, stream if and download it without problems (sharing version should be hybrid-v2)
  6. Sharing a file/folder with a non-existing user (a small one and a big one); the user should be able to see the file, stream if and download it without problems (sharing version should be hybrid-v2)
  7. Sharing a file/folder with a non-existing user from PROD (a small one and a big one); the user should be able to see the file, stream if and download it without problems (sharing version should be hybrid)
  8. Preview of own files works (NOTE: prod has no preview for shared files)
  9. Inviting to business workspace of new and existing users keeps working
  10. Downloading from business workspaces should keep working
  11. Downloading of big shared files (> 50 MB) should use multi-part download

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 19, 2026

Copy link
Copy Markdown

Deploying drive-web with  Cloudflare Pages  Cloudflare Pages

Latest commit: fc2c736
Status: ✅  Deploy successful!
Preview URL: https://be20d9d8.drive-web.pages.dev
Branch Preview URL: https://update-private-sharings.drive-web.pages.dev

View logs

@TamaraFinogina TamaraFinogina self-assigned this Aug 19, 2026
@TamaraFinogina TamaraFinogina mentioned this pull request Aug 20, 2026
7 tasks
@TamaraFinogina
TamaraFinogina force-pushed the update_private_sharings branch from 23eff4e to 8cbf76d Compare August 21, 2026 15:41
@TamaraFinogina
TamaraFinogina marked this pull request as ready for review August 21, 2026 16:52
@TamaraFinogina
TamaraFinogina requested review from a team, CandelR and larryrider as code owners August 21, 2026 16:52
@TamaraFinogina
TamaraFinogina requested a review from xabg2 August 21, 2026 16:55
@TamaraFinogina

Copy link
Copy Markdown
Contributor Author

@CandelR @larryrider @xabg2 Server side is merged, all should work

larryrider
larryrider previously approved these changes Aug 25, 2026
Comment thread src/app/network/download/v2.ts Outdated
return new NetworkFacade(
type DownloadFileFunction = (params: DownloadSharedFileParams | DownloadOwnFile) => DownloadFileResponse;

/**

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which comment? It is a function description. You mean remove it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is pretty redundant that createNetworkFacade creates a Network Facade. No need to have a comment explaining that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xabg2 all done

Comment thread src/app/network/download/v2.ts Outdated
key: { bucketKey },
options,
} = params;
async function multipartDownloadOwnFile(params: DownloadOwnFile & { fileSize: number }): Promise<FileStream> {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use arrow function.

Comment thread src/app/network/download/v2.ts Outdated
},
),
);
async function multipartDownloadSharedFile(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@CandelR CandelR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

d

Comment on lines +342 to +343
if (shareCredentials?.bucketKey) return { bucketKey: shareCredentials.bucketKey };
return { mnemonic: shareCredentials?.mnemonic ?? credentials.key.mnemonic };

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand that this is because v3 uses a bucketKey, and if there is no bucketKey, does that mean v2? Is that right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, hybrid works with mnemonic, and hybrid-v2 works with bucketKey. If not set properly, the download will fail

P.S. v3 is for public sharing because it has v2 already

@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants